<template>
  <div class="container-all">
    <scroll-view :scroll-y="true"
                 :style="{'height': '625px'}">
      <!-- 医生板块 -->
      <div class="section doctors"
           v-if="all_list.doctor&&all_list.doctor.length>0">
        <div class="title">
          医生
          <div class="bottom-bar"
               @tap="to_tab(3)">查看全部({{all_list.total.doctor_total}})</div>
        </div>
        <doctor-list :doc_list="all_list.doctor"></doctor-list>
      </div>
      <!-- 医院板块 -->
      <div class="section hospital"
           v-if="all_list.hospital&&all_list.hospital.length>0">
        <div class="title">
          医院
          <div class="bottom-bar"
               @tap="to_tab(4)">查看全部({{all_list.total.hospital_total}})</div>
        </div>
        <hospital-list :hos_list="all_list.hospital"></hospital-list>
      </div>
      <!-- 项目板块 -->
      <div class="section projects"
           v-if="all_list.projects&&all_list.projects.length>0">
        <div class="title">
          项目
          <div class="bottom-bar"
               @tap="to_tab(1)">查看全部({{all_list.total.projects_total}})</div>
        </div>
        <project-list :project_list="all_list.projects"></project-list>
      </div>
      <!-- 商品板块 -->
      <div class="section goods"
           v-if="all_list.shops&&all_list.shops.length>0&&result_status=='1'">
        <div class="title">
          商品
          <div class="bottom-bar"
               @tap="to_tab(2)">查看全部({{all_list.total.shops_total}})</div>
        </div>
        <goods-list :goods_list="all_list.shops"></goods-list>
      </div>
      <empty v-if="all_list.total&&(all_list.total_num==0||(all_list.total.doctor_total==0&&all_list.total.hospital_total==0&&all_list.total.projects_total==0&&result_status=='2'))"></empty>
    </scroll-view>
  </div>
</template>

<script>
import common from "@/assets/js/mmk_common.js";
import doctorList from "@/components/search_list/doctor_list";
import hospitalList from "@/components/search_list/hospital_list";
import projectList from "@/components/search_list/projects_list";
import goodsList from "@/components/search_list/goods_list";
import listBotton from "@/components/search/result_item/bottom";
import empty from "@/components/search/empty";
export default {
  data () {
    return {
      base_url: common.image_resource,
      score: 4
    };
  },
  props: ["all_list", "result_status"],
  methods: {
    to_tab (tab) {
      this.$emit("toggle_tab", tab);
    }
  },
  computed: {},
  components: {
    listBotton,
    doctorList,
    hospitalList,
    projectList,
    goodsList,
    empty
  },
  created () { }
};
</script>


<style lang="less" scoped>
.container-all {
  background: rgba(243, 244, 246, 1);
  height: 100%;
  //   公共标题，尾部
  .section {
    .title {
      line-height: 37px;
      font-size: 14px;
      font-family: "PingFangSC-Regular";
      font-weight: 500;
      color: #333;
      padding: 0 10px;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
    }
    .bottom-bar {
      font-size: 12px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: rgba(102, 102, 102, 1);
      line-height: 18px;
    }
  }

  //   商品板块
  .goods {
  }
}
</style>
